package service;

import bean.User;
import dao.UserDao;
import factory.DaoFactory;

public class UserService {

    //自定义成员变量来记录用户数据访问对象
    private UserDao userDao;

    /**
     * 自定义构造方法实现成员变量的初始化
     */
    public UserService(){
        this.userDao = DaoFactory.getUserDao();
    }

    /**
     * //自定义成员方法实现根据参数指定的User对象调用Dao层实现登陆功能
     * @param user
     * @return
     */
    public User userLoginService(User user){
        return userDao.userLogin(user);
    }
}
